package com.wjs.spring.homework;

import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        //创建目标对象
        Student target = new StudentImpl();
        //创建代理对象
        Student student  = (Student)Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(),new StudentProxy(target));
        student.study();
        System.out.println("*****************");
        student.homework();
   }
}
